/**
 * 
 */
package br.com.sistransporte.transitedto.tabelahorario;

import java.util.ArrayList;

import br.com.sistransporte.transitedto.diasemana.DiaSemanaDTO;
import br.com.sistransporte.transitedto.evento.EventoDTO;
import br.com.sistransporte.transitedto.horario.HorarioDTO;
import br.com.src.dto.abstractdto.AbstractDTO;

/**
 * Classe que representa
 *
 *
 * @author Nelson Luis da Silva Junior <nelson.jr13@hotmail.com>
 * @since 18 de Set de 2013 01:08:56
 * @version 1.0
 */
public class TabelaHorarioDTO extends AbstractDTO{
	
	/**
     * 
     */
    private static final long serialVersionUID = -6904227980796886919L;
	private DiaSemanaDTO diaSemana = new DiaSemanaDTO();
	private ArrayList< HorarioDTO > listaHorarios = new ArrayList< HorarioDTO >();
	private EventoDTO evento = new EventoDTO();
	
	public TabelaHorarioDTO(){}
	
	public TabelaHorarioDTO(String id){
		super( id );
	}
	
	public TabelaHorarioDTO( String id, DiaSemanaDTO diaSemana, ArrayList< HorarioDTO > listaHorarios, EventoDTO evento ){
	    super( id );
	    setDiaSemana( diaSemana );
	    setListaHorarios( listaHorarios );
	    setEvento( evento );
    }

	public DiaSemanaDTO getDiaSemana() {
    	return diaSemana;
    }

	public void setDiaSemana( DiaSemanaDTO diaSemana ) {
    	this.diaSemana = diaSemana;
    }

	public ArrayList< HorarioDTO > getListaHorarios() {
    	return listaHorarios;
    }

	public void setListaHorarios( ArrayList< HorarioDTO > listaHorarios ) {
    	this.listaHorarios = listaHorarios;
    }

	public EventoDTO getEvento() {
    	return evento;
    }

	public void setEvento( EventoDTO evento ) {
    	this.evento = evento;
    }

	@Override
    public String toString() {
	    return "TabelaHorarioDTO [diaSemana=" + diaSemana + ", listaHorarios=" + listaHorarios + ", evento=" + evento + "]";
    }

	@Override
    public int hashCode() {
	    final int prime = 31;
	    int result = 1;
	    result = prime * result + ( ( diaSemana == null ) ? 0 : diaSemana.hashCode() );
	    result = prime * result + ( ( evento == null ) ? 0 : evento.hashCode() );
	    result = prime * result + ( ( listaHorarios == null ) ? 0 : listaHorarios.hashCode() );
	    return result;
    }

	@Override
    public boolean equals( Object obj ) {
	    if ( this == obj )
		    return true;
	    if ( obj == null )
		    return false;
	    if ( getClass() != obj.getClass() )
		    return false;
	    TabelaHorarioDTO other = (TabelaHorarioDTO) obj;
	    if ( diaSemana == null ) {
		    if ( other.diaSemana != null )
			    return false;
	    } else if ( !diaSemana.equals( other.diaSemana ) )
		    return false;
	    if ( evento == null ) {
		    if ( other.evento != null )
			    return false;
	    } else if ( !evento.equals( other.evento ) )
		    return false;
	    if ( listaHorarios == null ) {
		    if ( other.listaHorarios != null )
			    return false;
	    } else if ( !listaHorarios.equals( other.listaHorarios ) )
		    return false;
	    return true;
    }

	
}
